package cn.wolfcode.consumermodel;

import org.apache.rocketmq.spring.annotation.MessageModel;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 消费者模式
 * @Author: 伍家钰
 * @Date: 2020/9/4 11:06
 * @Version: 1.0
 */
@RestController
@RocketMQMessageListener(
        topic = "04-boot-model",
        consumerGroup = "wolfcode-model-group",
        // 广播模式
        messageModel = MessageModel.BROADCASTING
)
public class ComsumerModel implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println("消费者一:" + "==============>消费信息:" + s);
    }
}
